Attribute VB_Name = "xor"
Public Function xor_encrypt(ByVal text As String, ByVal key As String) As String
Dim i As Long
Dim KeyChar As Long
Dim Result As String

KeyChar = Asc(key)
For i = 1 To Len(text)
Result = Result & Chr(KeyChar Xor Asc(Mid(text, i, 1)))
Next
xor_encrypt = Result

End Function
